// 骨架屏动画
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

// 基础骨架屏样式
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4rpx;
}

// 商品卡片骨架屏
.product-skeleton {
  background: white;
  border-radius: 16rpx;
  overflow: hidden;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  
  .skeleton-image {
    width: 100%;
    height: 200rpx;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
  }
  
  .skeleton-content {
    padding: 20rpx;
    
    .skeleton-title {
      height: 32rpx;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200px 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 4rpx;
      margin-bottom: 15rpx;
      width: 80%;
    }
    
    .skeleton-price {
      height: 40rpx;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200px 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 4rpx;
      margin-bottom: 15rpx;
      width: 60%;
    }
    
    .skeleton-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      
      .skeleton-text {
        height: 24rpx;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200px 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4rpx;
        width: 40%;
      }
      
      .skeleton-rating {
        height: 24rpx;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200px 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4rpx;
        width: 20%;
      }
    }
  }
}

// 医院卡片骨架屏
.hospital-skeleton {
  background: white;
  border-radius: 16rpx;
  padding: 20rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
  
  .skeleton-header {
    display: flex;
    gap: 16rpx;
    margin-bottom: 16rpx;
    
    .skeleton-logo {
      width: 80rpx;
      height: 80rpx;
      border-radius: 50%;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200px 100%;
      animation: shimmer 1.5s infinite;
      flex-shrink: 0;
    }
    
    .skeleton-info {
      flex: 1;
      
      .skeleton-name {
        height: 32rpx;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200px 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4rpx;
        margin-bottom: 8rpx;
        width: 70%;
      }
      
      .skeleton-meta {
        height: 24rpx;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200px 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4rpx;
        width: 50%;
      }
    }
  }
  
  .skeleton-content {
    .skeleton-text {
      height: 24rpx;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200px 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 4rpx;
      margin-bottom: 8rpx;
      width: 100%;
      
      &:last-child {
        width: 60%;
      }
    }
  }
}

// 医生卡片骨架屏
.doctor-skeleton {
  background: white;
  border-radius: 16rpx;
  padding: 20rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
  
  .skeleton-header {
    display: flex;
    gap: 16rpx;
    margin-bottom: 16rpx;
    
    .skeleton-avatar {
      width: 100rpx;
      height: 100rpx;
      border-radius: 50%;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200px 100%;
      animation: shimmer 1.5s infinite;
      flex-shrink: 0;
    }
    
    .skeleton-info {
      flex: 1;
      
      .skeleton-name {
        height: 32rpx;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200px 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4rpx;
        margin-bottom: 12rpx;
        width: 60%;
      }
      
      .skeleton-specialties {
        display: flex;
        gap: 8rpx;
        
        .skeleton-tag {
          height: 24rpx;
          background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
          background-size: 200px 100%;
          animation: shimmer 1.5s infinite;
          border-radius: 12rpx;
          width: 80rpx;
        }
      }
    }
  }
  
  .skeleton-content {
    .skeleton-text {
      height: 24rpx;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200px 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 4rpx;
      margin-bottom: 8rpx;
      width: 100%;
      
      &:last-child {
        width: 70%;
      }
    }
  }
}

// 骨架屏网格
.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20rpx;
  padding: 20rpx;
}

// 骨架屏列表
.skeleton-list {
  padding: 20rpx;
}
